#ifndef _H_X_WAV
#define _H_X_WAV

#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QSpinBox>
#include <QTextStream>
#include <QGroupBox>
#include <QLayout>
#include <QLabel>
#include <QProgressBar>
#include "Basic.h"
#include "XLpa.h"
#include <sndfile.hh>

class XWav : public QWidget {
	Q_OBJECT
	
	QProgressBar *progressBar;
	QLabel *srateEdit;
	QLabel *frameEdit;
	QSpinBox *windowEdit;
	QLabel *windowLabel;
	QSpinBox *headerEdit;

	QString inputFile;
	int samplerate;

private slots:
	void windowEditChanged(int value);
	
public:
	XWav(QWidget *parent = 0);
	void convert(QString outputFile);
	void update(QString inputFile);
	void setParameters(int w, int h);
};

#endif
